import React, { useState } from 'react'
import { Input } from 'antd'

const { TextArea } = Input
import { Editor } from 'react-draft-wysiwyg'
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'

export default function NewsEditor() {
  const [editorState, setEditorState] = useState('')
  const onChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
    console.log(e.target.value)
    setEditorState(e.target.value)
  }
  return (
    <div>
      <TextArea placeholder="textarea with clear icon" allowClear onChange={onChange} />
    </div>
  )
}
